﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<AnalisisDeRiesgos.Models.User.SearchUserModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Información de los usuarios
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Buscar Usuario</h2>

    <% using (Html.BeginForm()) {%>   
        <fieldset>
            <legend>Campos</legend>            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Pattern) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Pattern, new { size = 50 })%>                
                <input type="submit" value="Buscar" />
            </div>
            <div>
                <%: Html.ValidationMessageFor(model => model.Pattern) %>
            </div>
            <div class="editor-field">                    
                <%: Html.LabelFor(model => model.Criteria) %> <br />
                <%: Html.RadioButtonFor(model => model.Criteria, AnalisisDeRiesgos.Models.User.SearchUserType.ForCI, true) %> Por CI <br />
                <%: Html.RadioButtonFor(model => model.Criteria, AnalisisDeRiesgos.Models.User.SearchUserType.ForLastName) %> Por Apellido Paterno <br />
                <%: Html.RadioButtonFor(model => model.Criteria, AnalisisDeRiesgos.Models.User.SearchUserType.ForName) %> Por Nombre <br />
                
            </div>            
            <%: Html.ActionLink("Registrar Usuario", "Create") %> 
        </fieldset>
        <%: Html.ValidationSummary(true) %>               
    <% } %>
    <% if (Model.UserInfo.Count > 0)
           Html.RenderPartial("~/Views/User/IndexList.ascx", Model.UserInfo);
    %>
</asp:Content>

